""" System imports """
import logging

""" Equinox """
from events import *

""" Other modules """


""" Set up logging """
_log = logging.getLogger("equinox.cpuspinnercontroller")

class CPUSpinnerController:
    """..."""
    def __init__(self, evManager):
        self.evManager = evManager
        self.evManager.registerListener( self )

        self.keepGoing = 1

    #----------------------------------------------------------------------
    def run(self):
        while self.keepGoing:
            event = TickEvent()
            self.evManager.post( event )

    #----------------------------------------------------------------------
    def notify(self, event):
        if isinstance( event, QuitEvent ):
            #this will stop the while loop from running
            self.keepGoing = False
